#bd-editor-panel {
    display: flex;
    flex-direction: column;
}

#bd-editor-controls button {
    margin: 0 5px 0 0;
    background: none;
    color: var(--interactive-normal);
    height: 26px;
    font-weight: 600;
    border-radius: 3px;
    display: flex;
    align-items: center;
}

#bd-editor-controls button:hover {
    background: var(--background-modifier-hover);
    color: var(--interactive-hover);
}

#bd-editor-controls button:active {
    background: var(--background-modifier-active);
}

#bd-editor-controls button svg {
    fill: currentColor;
}

#bd-editor-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--background-base-lower);
    color: var(--text-default);
    border: none;
    box-shadow: var(--elevation-low);
    padding: 5px;
    z-index: 10;
}

.editor-wrapper {
    display: flex;
}

.editor {
    box-sizing: border-box;
    height: calc(100vh - 250px);
    font-size: 14px;
    width: 100%;
}

.controls-section {
    display: flex;
    align-items: center;
}

.controls-section.controls-right {
    gap: 15px;
}

.monaco-editor:not(.rename-box),
.monaco-editor .overflow-guard,
.monaco-editor .editor-scrollable,
.monaco-editor .minimap-shadow-visible,
.monaco-editor .decorationsOverviewRuler {
    height: 100% !important;
}

.monaco-editor:not(.rename-box),
.monaco-editor .overflow-guard,
.monaco-editor .overlayWidgets,
#bd-customcss-editor > div > .overflow-guard > div:nth-child(3) {
    width: 100% !important;
}

.monaco-editor .minimap {
    right: 14px;
    left: unset !important;
    height: 100% !important;
}

.monaco-editor .editor-scrollable {
    width: calc(100% - 64px) !important;
}

.monaco-editor .view-overlays .current-line {
    width: 1e+06px !important;
}

.bd-fallback-editor {
    height: 100%;
    width: 100%;
    resize: none;
    overflow: auto;
    white-space: nowrap;
}

[class*="errorPage_"] [class*="buttons_"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
}

[class*="errorPage_"] [class*="buttons_"] [class*="button_"] {
    width: 100%;
    max-width: 400px;
    margin: 0;
    transition: all 0.2s ease;
}

.bd-button-recovery {
    width: 100% !important;
    max-width: 400px !important;
    height: var(--custom-button-button-lg-height);
    min-height: var(--custom-button-button-lg-height);
    background-color: var(--button-danger-background) !important;
    margin-top: 8px !important;
}

.bd-error-toggle {
    width: 30% !important;
    padding: 12px !important;
    text-align: center !important;
    background: var(--background-base-lowest) !important;
    border: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-default);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.bd-error-toggle.expanded {
    background: var(--background-modifier-selected) !important;
}

.bd-error-toggle:hover {
    background: var(--background-modifier-hover) !important;
}

.bd-error-content-wrapper {
    height: 0;
    overflow: hidden;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bd-error-content {
    padding: 16px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-default);
    background: var(--background-base-lower);
    border-top: 1px solid var(--app-border-frame);
    opacity: 1;
    transform-origin: top;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-height: 500px;
    overflow-y: auto;
}

.bd-error-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.bd-error-content::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-auto-thumb);
    border-radius: 4px;
}

.bd-error-content::-webkit-scrollbar-track {
    background-color: var(--scrollbar-auto-track);
    border-radius: 4px;
}

.bd-error-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-auto-thumb-hover);
}

.bd-error-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.bd-error-container {
    width: 100%;
    max-width: 1500px;
    margin: 16px auto;
    background: var(--background-base-lower);
    border-radius: 8px;
    overflow: hidden;
}

.bd-error-toggle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: var(--background-base-lowest);
}

.bd-error-toggle {
    width: 30% !important;
    padding: 12px !important;
    text-align: center !important;
    background: var(--background-base-lowest) !important;
    border: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-default);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.bd-error-toggle.expanded {
    background: var(--background-modifier-selected) !important;
}

.bd-error-toggle:hover {
    background: var(--background-modifier-hover) !important;
}

.bd-error-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 800px;
    justify-content: center;
    padding: 0 16px;
}

.bd-error-actions button {
    flex: 1;
    max-width: 200px;
    padding: 8px 16px !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bd-error-github {
    background-color: "#fdd18c" !important;
}

.bd-error-github:hover {
    background-color: "#fcc145" !important;
}

.bd-error-discord {
    background-color: var(--button-positive-background) !important;
}

.bd-error-discord:hover {
    background-color: var(--button-positive-background-hover) !important;
}